package o;

import android.graphics.Color;
import android.text.Layout.Alignment;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.style.BackgroundColorSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.StyleSpan;
import android.text.style.UnderlineSpan;
import com.google.android.exoplayer2.text.Cue;
import com.google.android.exoplayer2.text.SubtitleDecoderException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import o.ah.g;

public final class ajq extends ajp {
    private c ʻ;
    private List<Cue> ʽ;
    private d ˊ;
    private final int ˋ;
    private final ane ˎ = new ane();
    private final anc ˏ = new anc();
    private final d[] ॱ;
    private int ॱॱ;
    private List<Cue> ᐝ;

    static final class c {
        public final byte[] ˊ;
        int ˋ = 0;
        public final int ˎ;
        public final int ˏ;

        public c(int i, int i2) {
            this.ˎ = i;
            this.ˏ = i2;
            this.ˊ = new byte[((i2 * 2) - 1)];
        }
    }

    static final class d {
        private static final int[] ʻ = new int[]{ˊ, ˏ, ˊ, ˊ, ˏ, ˊ, ˊ};
        private static final int[] ʼ = new int[]{0, 0, 0, 0, 0, 3, 3};
        private static final int[] ʽ = new int[]{3, 3, 3, 3, 3, 3, 1};
        public static final int ˊ = ॱ(0, 0, 0, 0);
        private static final int[] ˋ = new int[]{0, 0, 0, 0, 0, 0, 2};
        private static final int[] ˎ = new int[]{0, 0, 0, 0, 0, 2, 0};
        public static final int ˏ = ॱ(0, 0, 0, 3);
        public static final int ॱ = ॱ(2, 2, 2, 0);
        private static final int[] ॱˊ = new int[]{ˊ, ˊ, ˊ, ˊ, ˊ, ˏ, ˏ};
        private static final boolean[] ॱॱ = new boolean[]{false, false, false, true, true, true, false};
        private static final int[] ᐝ = new int[]{0, 1, 2, 3, 4, 3, 4};
        private int ʻॱ;
        private int ʼॱ;
        private int ʽॱ;
        private int ʾ;
        private int ʿ;
        private boolean ˈ;
        private int ˉ;
        private int ˊˊ;
        private int ˊˋ;
        private boolean ˊॱ;
        private int ˊᐝ;
        private int ˋˊ;
        private boolean ˋॱ;
        private int ˋᐝ;
        private int ˌ;
        private int ˎˎ;
        private final SpannableStringBuilder ˏॱ = new SpannableStringBuilder();
        private final List<SpannableString> ͺ = new ArrayList();
        private int ॱˋ;
        private boolean ॱˎ;
        private int ॱᐝ;
        private int ᐝॱ;

        public d() {
            ˏ();
        }

        public boolean ॱ() {
            return !ˎ() || (this.ͺ.isEmpty() && this.ˏॱ.length() == 0);
        }

        public void ˏ() {
            ˋ();
            this.ˊॱ = false;
            this.ˋॱ = false;
            this.ʻॱ = 4;
            this.ॱˎ = false;
            this.ॱˋ = 0;
            this.ॱᐝ = 0;
            this.ᐝॱ = 0;
            this.ʾ = 15;
            this.ˈ = true;
            this.ʿ = 0;
            this.ʼॱ = 0;
            this.ʽॱ = 0;
            this.ˊˋ = ˊ;
            this.ˊˊ = ॱ;
            this.ˋᐝ = ˊ;
        }

        public void ˋ() {
            this.ͺ.clear();
            this.ˏॱ.clear();
            this.ˋˊ = -1;
            this.ˊᐝ = -1;
            this.ˉ = -1;
            this.ˌ = -1;
            this.ˎˎ = 0;
        }

        public boolean ˎ() {
            return this.ˊॱ;
        }

        public void ˊ(boolean z) {
            this.ˋॱ = z;
        }

        public boolean ˊ() {
            return this.ˋॱ;
        }

        public void ˏ(boolean z, boolean z2, boolean z3, int i, boolean z4, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
            this.ˊॱ = true;
            this.ˋॱ = z;
            this.ˈ = z2;
            this.ʻॱ = i;
            this.ॱˎ = z4;
            this.ॱˋ = i2;
            this.ॱᐝ = i3;
            this.ᐝॱ = i6;
            if (this.ʾ != i4 + 1) {
                this.ʾ = i4 + 1;
                while (true) {
                    if ((!z2 || this.ͺ.size() < this.ʾ) && this.ͺ.size() < 15) {
                        break;
                    }
                    this.ͺ.remove(0);
                }
            }
            if (!(i7 == 0 || this.ʼॱ == i7)) {
                this.ʼॱ = i7;
                int i9 = i7 - 1;
                ˋ(ʻ[i9], ˏ, ॱॱ[i9], 0, ˋ[i9], ʽ[i9], ˎ[i9]);
            }
            if (i8 != 0 && this.ʽॱ != i8) {
                this.ʽॱ = i8;
                int i10 = i8 - 1;
                ˋ(0, 1, 1, false, false, ʼ[i10], ᐝ[i10]);
                ॱ(ॱ, ॱˊ[i10], ˊ);
            }
        }

        public void ˋ(int i, int i2, boolean z, int i3, int i4, int i5, int i6) {
            this.ˊˋ = i;
            this.ʿ = i6;
        }

        public void ˋ(int i, int i2, int i3, boolean z, boolean z2, int i4, int i5) {
            if (this.ˋˊ != -1) {
                if (!z) {
                    this.ˏॱ.setSpan(new StyleSpan(2), this.ˋˊ, this.ˏॱ.length(), 33);
                    this.ˋˊ = -1;
                }
            } else if (z) {
                this.ˋˊ = this.ˏॱ.length();
            }
            if (this.ˊᐝ != -1) {
                if (!z2) {
                    this.ˏॱ.setSpan(new UnderlineSpan(), this.ˊᐝ, this.ˏॱ.length(), 33);
                    this.ˊᐝ = -1;
                }
            } else if (z2) {
                this.ˊᐝ = this.ˏॱ.length();
            }
        }

        public void ॱ(int i, int i2, int i3) {
            if (!(this.ˉ == -1 || this.ˊˊ == i)) {
                this.ˏॱ.setSpan(new ForegroundColorSpan(this.ˊˊ), this.ˉ, this.ˏॱ.length(), 33);
            }
            if (i != ॱ) {
                this.ˉ = this.ˏॱ.length();
                this.ˊˊ = i;
            }
            if (!(this.ˌ == -1 || this.ˋᐝ == i2)) {
                this.ˏॱ.setSpan(new BackgroundColorSpan(this.ˋᐝ), this.ˌ, this.ˏॱ.length(), 33);
            }
            if (i2 != ˊ) {
                this.ˌ = this.ˏॱ.length();
                this.ˋᐝ = i2;
            }
        }

        public void ॱ(int i, int i2) {
            if (this.ˎˎ != i) {
                ˋ('\n');
            }
            this.ˎˎ = i;
        }

        public void ॱॱ() {
            int length = this.ˏॱ.length();
            if (length > 0) {
                this.ˏॱ.delete(length - 1, length);
            }
        }

        public void ˋ(char c) {
            if (c == '\n') {
                this.ͺ.add(ʻ());
                this.ˏॱ.clear();
                if (this.ˋˊ != -1) {
                    this.ˋˊ = 0;
                }
                if (this.ˊᐝ != -1) {
                    this.ˊᐝ = 0;
                }
                if (this.ˉ != -1) {
                    this.ˉ = 0;
                }
                if (this.ˌ != -1) {
                    this.ˌ = 0;
                }
                while (true) {
                    if ((this.ˈ && this.ͺ.size() >= this.ʾ) || this.ͺ.size() >= 15) {
                        this.ͺ.remove(0);
                    } else {
                        return;
                    }
                }
            }
            this.ˏॱ.append(c);
        }

        public SpannableString ʻ() {
            CharSequence spannableStringBuilder = new SpannableStringBuilder(this.ˏॱ);
            int length = spannableStringBuilder.length();
            if (length > 0) {
                if (this.ˋˊ != -1) {
                    spannableStringBuilder.setSpan(new StyleSpan(2), this.ˋˊ, length, 33);
                }
                if (this.ˊᐝ != -1) {
                    spannableStringBuilder.setSpan(new UnderlineSpan(), this.ˊᐝ, length, 33);
                }
                if (this.ˉ != -1) {
                    spannableStringBuilder.setSpan(new ForegroundColorSpan(this.ˊˊ), this.ˉ, length, 33);
                }
                if (this.ˌ != -1) {
                    spannableStringBuilder.setSpan(new BackgroundColorSpan(this.ˋᐝ), this.ˌ, length, 33);
                }
            }
            return new SpannableString(spannableStringBuilder);
        }

        public ajs ᐝ() {
            int i = 2;
            if (ॱ()) {
                return null;
            }
            Alignment alignment;
            float f;
            float f2;
            int i2;
            boolean z;
            CharSequence spannableStringBuilder = new SpannableStringBuilder();
            for (int i3 = 0; i3 < this.ͺ.size(); i3++) {
                spannableStringBuilder.append((CharSequence) this.ͺ.get(i3));
                spannableStringBuilder.append('\n');
            }
            spannableStringBuilder.append(ʻ());
            switch (this.ʿ) {
                case 0:
                case 3:
                    alignment = Alignment.ALIGN_NORMAL;
                    break;
                case 1:
                    alignment = Alignment.ALIGN_OPPOSITE;
                    break;
                case 2:
                    alignment = Alignment.ALIGN_CENTER;
                    break;
                default:
                    throw new IllegalArgumentException("Unexpected justification value: " + this.ʿ);
            }
            if (this.ॱˎ) {
                f = ((float) this.ॱᐝ) / 99.0f;
                f2 = ((float) this.ॱˋ) / 99.0f;
            } else {
                f = ((float) this.ॱᐝ) / 209.0f;
                f2 = ((float) this.ॱˋ) / 74.0f;
            }
            float f3 = (f * 0.9f) + 0.05f;
            f = (f2 * 0.9f) + 0.05f;
            if (this.ᐝॱ % 3 == 0) {
                i2 = 0;
            } else if (this.ᐝॱ % 3 == 1) {
                i2 = 1;
            } else {
                i2 = 2;
            }
            if (this.ᐝॱ / 3 == 0) {
                i = 0;
            } else if (this.ᐝॱ / 3 == 1) {
                i = 1;
            }
            if (this.ˊˋ != ˊ) {
                z = true;
            } else {
                z = false;
            }
            return new ajs(spannableStringBuilder, alignment, f, 0, i2, f3, i, Float.MIN_VALUE, z, this.ˊˋ, this.ʻॱ);
        }

        public static int ˊ(int i, int i2, int i3) {
            return ॱ(i, i2, i3, 0);
        }

        public static int ॱ(int i, int i2, int i3, int i4) {
            int i5;
            int i6;
            int i7;
            int i8 = 255;
            amm.ˏ(i, 0, 4);
            amm.ˏ(i2, 0, 4);
            amm.ˏ(i3, 0, 4);
            amm.ˏ(i4, 0, 4);
            switch (i4) {
                case 0:
                case 1:
                    i5 = 255;
                    break;
                case 2:
                    i5 = 127;
                    break;
                case 3:
                    i5 = 0;
                    break;
                default:
                    i5 = 255;
                    break;
            }
            if (i > 1) {
                i6 = 255;
            } else {
                i6 = 0;
            }
            if (i2 > 1) {
                i7 = 255;
            } else {
                i7 = 0;
            }
            if (i3 <= 1) {
                i8 = 0;
            }
            return Color.argb(i5, i6, i7, i8);
        }
    }

    public /* bridge */ /* synthetic */ ajj ʼ() throws SubtitleDecoderException {
        return super.ʼ();
    }

    public /* bridge */ /* synthetic */ ajl ʽ() throws SubtitleDecoderException {
        return super.ʽ();
    }

    public /* bridge */ /* synthetic */ void ˎ() {
        super.ˎ();
    }

    public ajq(int i, List<byte[]> list) {
        if (i == -1) {
            i = 1;
        }
        this.ˋ = i;
        this.ॱ = new d[8];
        for (int i2 = 0; i2 < 8; i2++) {
            this.ॱ[i2] = new d();
        }
        this.ˊ = this.ॱ[0];
        ॱˋ();
    }

    public void ˋ() {
        super.ˋ();
        this.ᐝ = null;
        this.ʽ = null;
        this.ॱॱ = 0;
        this.ˊ = this.ॱ[this.ॱॱ];
        ॱˋ();
        this.ʻ = null;
    }

    protected boolean ˊ() {
        return this.ᐝ != this.ʽ;
    }

    protected aji ʻ() {
        this.ʽ = this.ᐝ;
        return new ajw(this.ᐝ);
    }

    protected void ˊ(ajl o_ajl) {
        this.ˏ.ॱ(o_ajl.ॱ.array(), o_ajl.ॱ.limit());
        while (this.ˏ.ˊ() >= 3) {
            int ʽ = this.ˏ.ʽ() & 7;
            int i = ʽ & 3;
            Object obj = (ʽ & 4) == 4 ? 1 : null;
            byte ʽ2 = (byte) this.ˏ.ʽ();
            byte ʽ3 = (byte) this.ˏ.ʽ();
            if ((i == 2 || i == 3) && obj != null) {
                byte[] bArr;
                c cVar;
                int i2;
                if (i == 3) {
                    ॱॱ();
                    i = (ʽ2 & 192) >> 6;
                    ʽ = ʽ2 & 63;
                    if (ʽ == 0) {
                        ʽ = 64;
                    }
                    this.ʻ = new c(i, ʽ);
                    bArr = this.ʻ.ˊ;
                    cVar = this.ʻ;
                    i2 = cVar.ˋ;
                    cVar.ˋ = i2 + 1;
                    bArr[i2] = ʽ3;
                } else {
                    boolean z;
                    if (i == 2) {
                        z = true;
                    } else {
                        z = false;
                    }
                    amm.ˊ(z);
                    if (this.ʻ == null) {
                        amz.ˋ("Cea708Decoder", "Encountered DTVCC_PACKET_DATA before DTVCC_PACKET_START");
                    } else {
                        bArr = this.ʻ.ˊ;
                        cVar = this.ʻ;
                        int i3 = cVar.ˋ;
                        cVar.ˋ = i3 + 1;
                        bArr[i3] = ʽ2;
                        bArr = this.ʻ.ˊ;
                        cVar = this.ʻ;
                        i2 = cVar.ˋ;
                        cVar.ˋ = i2 + 1;
                        bArr[i2] = ʽ3;
                    }
                }
                if (this.ʻ.ˋ == (this.ʻ.ˏ * 2) - 1) {
                    ॱॱ();
                }
            }
        }
    }

    private void ॱॱ() {
        if (this.ʻ != null) {
            ᐝ();
            this.ʻ = null;
        }
    }

    private void ᐝ() {
        if (this.ʻ.ˋ != (this.ʻ.ˏ * 2) - 1) {
            amz.ˏ("Cea708Decoder", "DtvCcPacket ended prematurely; size is " + ((this.ʻ.ˏ * 2) - 1) + ", but current index is " + this.ʻ.ˋ + " (sequence number " + this.ʻ.ˎ + "); ignoring packet");
            return;
        }
        this.ˎ.ˋ(this.ʻ.ˊ, this.ʻ.ˋ);
        int ॱ = this.ˎ.ॱ(3);
        int ॱ2 = this.ˎ.ॱ(5);
        if (ॱ == 7) {
            this.ˎ.ˎ(2);
            ॱ = this.ˎ.ॱ(6);
            if (ॱ < 7) {
                amz.ˏ("Cea708Decoder", "Invalid extended service number: " + ॱ);
            }
        }
        if (ॱ2 == 0) {
            if (ॱ != 0) {
                amz.ˏ("Cea708Decoder", "serviceNumber is non-zero (" + ॱ + ") when blockSize is 0");
            }
        } else if (ॱ == this.ˋ) {
            Object obj = null;
            while (this.ˎ.ˏ() > 0) {
                ॱ2 = this.ˎ.ॱ(8);
                if (ॱ2 == 16) {
                    ॱ2 = this.ˎ.ॱ(8);
                    if (ॱ2 <= 31) {
                        ˏ(ॱ2);
                    } else if (ॱ2 <= 127) {
                        ʻ(ॱ2);
                        obj = 1;
                    } else if (ॱ2 <= 159) {
                        ˋ(ॱ2);
                    } else if (ॱ2 <= 255) {
                        ॱॱ(ॱ2);
                        obj = 1;
                    } else {
                        amz.ˏ("Cea708Decoder", "Invalid extended command: " + ॱ2);
                    }
                } else if (ॱ2 <= 31) {
                    ˊ(ॱ2);
                } else if (ॱ2 <= 127) {
                    ॱ(ॱ2);
                    obj = 1;
                } else if (ॱ2 <= 159) {
                    ˎ(ॱ2);
                    obj = 1;
                } else if (ॱ2 <= 255) {
                    ʽ(ॱ2);
                    obj = 1;
                } else {
                    amz.ˏ("Cea708Decoder", "Invalid base command: " + ॱ2);
                }
            }
            if (obj != null) {
                this.ᐝ = ͺ();
            }
        }
    }

    private void ˊ(int i) {
        switch (i) {
            case 0:
            case 14:
                return;
            case 3:
                this.ᐝ = ͺ();
                return;
            case 8:
                this.ˊ.ॱॱ();
                return;
            case 12:
                ॱˋ();
                return;
            case 13:
                this.ˊ.ˋ('\n');
                return;
            default:
                if (i >= 17 && i <= 23) {
                    amz.ˏ("Cea708Decoder", "Currently unsupported COMMAND_EXT1 Command: " + i);
                    this.ˎ.ˎ(8);
                    return;
                } else if (i < 24 || i > 31) {
                    amz.ˏ("Cea708Decoder", "Invalid C0 command: " + i);
                    return;
                } else {
                    amz.ˏ("Cea708Decoder", "Currently unsupported COMMAND_P16 Command: " + i);
                    this.ˎ.ˎ(16);
                    return;
                }
        }
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    private void ˎ(int r7) {
        /*
        r6 = this;
        r3 = 16;
        r2 = 0;
        r5 = 8;
        r1 = 1;
        switch(r7) {
            case 128: goto L_0x0022;
            case 129: goto L_0x0022;
            case 130: goto L_0x0022;
            case 131: goto L_0x0022;
            case 132: goto L_0x0022;
            case 133: goto L_0x0022;
            case 134: goto L_0x0022;
            case 135: goto L_0x0022;
            case 136: goto L_0x0031;
            case 137: goto L_0x0047;
            case 138: goto L_0x005e;
            case 139: goto L_0x0074;
            case 140: goto L_0x0095;
            case 141: goto L_0x00ab;
            case 142: goto L_0x0021;
            case 143: goto L_0x00b2;
            case 144: goto L_0x00b7;
            case 145: goto L_0x00cb;
            case 146: goto L_0x00e1;
            case 147: goto L_0x0009;
            case 148: goto L_0x0009;
            case 149: goto L_0x0009;
            case 150: goto L_0x0009;
            case 151: goto L_0x00f5;
            case 152: goto L_0x010b;
            case 153: goto L_0x010b;
            case 154: goto L_0x010b;
            case 155: goto L_0x010b;
            case 156: goto L_0x010b;
            case 157: goto L_0x010b;
            case 158: goto L_0x010b;
            case 159: goto L_0x010b;
            default: goto L_0x0009;
        };
    L_0x0009:
        r0 = "Cea708Decoder";
        r1 = new java.lang.StringBuilder;
        r1.<init>();
        r2 = "Invalid C1 command: ";
        r1 = r1.append(r2);
        r1 = r1.append(r7);
        r1 = r1.toString();
        o.amz.ˏ(r0, r1);
    L_0x0021:
        return;
    L_0x0022:
        r0 = r7 + -128;
        r1 = r6.ॱॱ;
        if (r1 == r0) goto L_0x0021;
    L_0x0028:
        r6.ॱॱ = r0;
        r1 = r6.ॱ;
        r0 = r1[r0];
        r6.ˊ = r0;
        goto L_0x0021;
    L_0x0031:
        if (r1 > r5) goto L_0x0021;
    L_0x0033:
        r0 = r6.ˎ;
        r0 = r0.ˊ();
        if (r0 == 0) goto L_0x0044;
    L_0x003b:
        r0 = r6.ॱ;
        r2 = 8 - r1;
        r0 = r0[r2];
        r0.ˋ();
    L_0x0044:
        r1 = r1 + 1;
        goto L_0x0031;
    L_0x0047:
        r0 = r1;
    L_0x0048:
        if (r0 > r5) goto L_0x0021;
    L_0x004a:
        r2 = r6.ˎ;
        r2 = r2.ˊ();
        if (r2 == 0) goto L_0x005b;
    L_0x0052:
        r2 = r6.ॱ;
        r3 = 8 - r0;
        r2 = r2[r3];
        r2.ˊ(r1);
    L_0x005b:
        r0 = r0 + 1;
        goto L_0x0048;
    L_0x005e:
        if (r1 > r5) goto L_0x0021;
    L_0x0060:
        r0 = r6.ˎ;
        r0 = r0.ˊ();
        if (r0 == 0) goto L_0x0071;
    L_0x0068:
        r0 = r6.ॱ;
        r3 = 8 - r1;
        r0 = r0[r3];
        r0.ˊ(r2);
    L_0x0071:
        r1 = r1 + 1;
        goto L_0x005e;
    L_0x0074:
        r3 = r1;
    L_0x0075:
        if (r3 > r5) goto L_0x0021;
    L_0x0077:
        r0 = r6.ˎ;
        r0 = r0.ˊ();
        if (r0 == 0) goto L_0x008f;
    L_0x007f:
        r0 = r6.ॱ;
        r4 = 8 - r3;
        r4 = r0[r4];
        r0 = r4.ˊ();
        if (r0 != 0) goto L_0x0093;
    L_0x008b:
        r0 = r1;
    L_0x008c:
        r4.ˊ(r0);
    L_0x008f:
        r0 = r3 + 1;
        r3 = r0;
        goto L_0x0075;
    L_0x0093:
        r0 = r2;
        goto L_0x008c;
    L_0x0095:
        if (r1 > r5) goto L_0x0021;
    L_0x0097:
        r0 = r6.ˎ;
        r0 = r0.ˊ();
        if (r0 == 0) goto L_0x00a8;
    L_0x009f:
        r0 = r6.ॱ;
        r2 = 8 - r1;
        r0 = r0[r2];
        r0.ˏ();
    L_0x00a8:
        r1 = r1 + 1;
        goto L_0x0095;
    L_0x00ab:
        r0 = r6.ˎ;
        r0.ˎ(r5);
        goto L_0x0021;
    L_0x00b2:
        r6.ॱˋ();
        goto L_0x0021;
    L_0x00b7:
        r0 = r6.ˊ;
        r0 = r0.ˎ();
        if (r0 != 0) goto L_0x00c6;
    L_0x00bf:
        r0 = r6.ˎ;
        r0.ˎ(r3);
        goto L_0x0021;
    L_0x00c6:
        r6.ˊॱ();
        goto L_0x0021;
    L_0x00cb:
        r0 = r6.ˊ;
        r0 = r0.ˎ();
        if (r0 != 0) goto L_0x00dc;
    L_0x00d3:
        r0 = r6.ˎ;
        r1 = 24;
        r0.ˎ(r1);
        goto L_0x0021;
    L_0x00dc:
        r6.ˋॱ();
        goto L_0x0021;
    L_0x00e1:
        r0 = r6.ˊ;
        r0 = r0.ˎ();
        if (r0 != 0) goto L_0x00f0;
    L_0x00e9:
        r0 = r6.ˎ;
        r0.ˎ(r3);
        goto L_0x0021;
    L_0x00f0:
        r6.ˏॱ();
        goto L_0x0021;
    L_0x00f5:
        r0 = r6.ˊ;
        r0 = r0.ˎ();
        if (r0 != 0) goto L_0x0106;
    L_0x00fd:
        r0 = r6.ˎ;
        r1 = 32;
        r0.ˎ(r1);
        goto L_0x0021;
    L_0x0106:
        r6.ॱˊ();
        goto L_0x0021;
    L_0x010b:
        r0 = r7 + -152;
        r6.ʼ(r0);
        r1 = r6.ॱॱ;
        if (r1 == r0) goto L_0x0021;
    L_0x0114:
        r6.ॱॱ = r0;
        r1 = r6.ॱ;
        r0 = r1[r0];
        r6.ˊ = r0;
        goto L_0x0021;
        */
        throw new UnsupportedOperationException("Method not decompiled: o.ajq.ˎ(int):void");
    }

    private void ˏ(int i) {
        if (i > 7) {
            if (i <= 15) {
                this.ˎ.ˎ(8);
            } else if (i <= 23) {
                this.ˎ.ˎ(16);
            } else if (i <= 31) {
                this.ˎ.ˎ(24);
            }
        }
    }

    private void ˋ(int i) {
        if (i <= 135) {
            this.ˎ.ˎ(32);
        } else if (i <= 143) {
            this.ˎ.ˎ(40);
        } else if (i <= 159) {
            this.ˎ.ˎ(2);
            this.ˎ.ˎ(this.ˎ.ॱ(6) * 8);
        }
    }

    private void ॱ(int i) {
        if (i == 127) {
            this.ˊ.ˋ('♫');
        } else {
            this.ˊ.ˋ((char) (i & 255));
        }
    }

    private void ʽ(int i) {
        this.ˊ.ˋ((char) (i & 255));
    }

    private void ʻ(int i) {
        switch (i) {
            case 32:
                this.ˊ.ˋ(' ');
                return;
            case 33:
                this.ˊ.ˋ(' ');
                return;
            case 37:
                this.ˊ.ˋ('…');
                return;
            case 42:
                this.ˊ.ˋ('Š');
                return;
            case 44:
                this.ˊ.ˋ('Œ');
                return;
            case 48:
                this.ˊ.ˋ('█');
                return;
            case 49:
                this.ˊ.ˋ('‘');
                return;
            case 50:
                this.ˊ.ˋ('’');
                return;
            case 51:
                this.ˊ.ˋ('“');
                return;
            case 52:
                this.ˊ.ˋ('”');
                return;
            case 53:
                this.ˊ.ˋ('•');
                return;
            case 57:
                this.ˊ.ˋ('™');
                return;
            case 58:
                this.ˊ.ˋ('š');
                return;
            case o.fc.c.ᴵ /*60*/:
                this.ˊ.ˋ('œ');
                return;
            case o.fc.c.ᵢ /*61*/:
                this.ˊ.ˋ('℠');
                return;
            case o.fc.c.ㆍॱ /*63*/:
                this.ˊ.ˋ('Ÿ');
                return;
            case 118:
                this.ˊ.ˋ('⅛');
                return;
            case 119:
                this.ˊ.ˋ('⅜');
                return;
            case g.ॱˍ /*120*/:
                this.ˊ.ˋ('⅝');
                return;
            case 121:
                this.ˊ.ˋ('⅞');
                return;
            case 122:
                this.ˊ.ˋ('│');
                return;
            case 123:
                this.ˊ.ˋ('┐');
                return;
            case 124:
                this.ˊ.ˋ('└');
                return;
            case 125:
                this.ˊ.ˋ('─');
                return;
            case 126:
                this.ˊ.ˋ('┘');
                return;
            case 127:
                this.ˊ.ˋ('┌');
                return;
            default:
                amz.ˏ("Cea708Decoder", "Invalid G2 character: " + i);
                return;
        }
    }

    private void ॱॱ(int i) {
        if (i == 160) {
            this.ˊ.ˋ('㏄');
            return;
        }
        amz.ˏ("Cea708Decoder", "Invalid G3 character: " + i);
        this.ˊ.ˋ('_');
    }

    private void ˊॱ() {
        this.ˊ.ˋ(this.ˎ.ॱ(4), this.ˎ.ॱ(2), this.ˎ.ॱ(2), this.ˎ.ˊ(), this.ˎ.ˊ(), this.ˎ.ॱ(3), this.ˎ.ॱ(3));
    }

    private void ˋॱ() {
        int ॱ = d.ॱ(this.ˎ.ॱ(2), this.ˎ.ॱ(2), this.ˎ.ॱ(2), this.ˎ.ॱ(2));
        int ॱ2 = d.ॱ(this.ˎ.ॱ(2), this.ˎ.ॱ(2), this.ˎ.ॱ(2), this.ˎ.ॱ(2));
        this.ˎ.ˎ(2);
        this.ˊ.ॱ(ॱ, ॱ2, d.ˊ(this.ˎ.ॱ(2), this.ˎ.ॱ(2), this.ˎ.ॱ(2)));
    }

    private void ˏॱ() {
        this.ˎ.ˎ(4);
        int ॱ = this.ˎ.ॱ(4);
        this.ˎ.ˎ(2);
        this.ˊ.ॱ(ॱ, this.ˎ.ॱ(6));
    }

    private void ॱˊ() {
        int ॱ = d.ॱ(this.ˎ.ॱ(2), this.ˎ.ॱ(2), this.ˎ.ॱ(2), this.ˎ.ॱ(2));
        int ॱ2 = this.ˎ.ॱ(2);
        int ˊ = d.ˊ(this.ˎ.ॱ(2), this.ˎ.ॱ(2), this.ˎ.ॱ(2));
        if (this.ˎ.ˊ()) {
            ॱ2 |= 4;
        }
        boolean ˊ2 = this.ˎ.ˊ();
        int ॱ3 = this.ˎ.ॱ(2);
        int ॱ4 = this.ˎ.ॱ(2);
        int ॱ5 = this.ˎ.ॱ(2);
        this.ˎ.ˎ(8);
        this.ˊ.ˋ(ॱ, ˊ, ˊ2, ॱ2, ॱ3, ॱ4, ॱ5);
    }

    private void ʼ(int i) {
        d dVar = this.ॱ[i];
        this.ˎ.ˎ(2);
        boolean ˊ = this.ˎ.ˊ();
        boolean ˊ2 = this.ˎ.ˊ();
        boolean ˊ3 = this.ˎ.ˊ();
        int ॱ = this.ˎ.ॱ(3);
        boolean ˊ4 = this.ˎ.ˊ();
        int ॱ2 = this.ˎ.ॱ(7);
        int ॱ3 = this.ˎ.ॱ(8);
        int ॱ4 = this.ˎ.ॱ(4);
        int ॱ5 = this.ˎ.ॱ(4);
        this.ˎ.ˎ(2);
        int ॱ6 = this.ˎ.ॱ(6);
        this.ˎ.ˎ(2);
        dVar.ˏ(ˊ, ˊ2, ˊ3, ॱ, ˊ4, ॱ2, ॱ3, ॱ5, ॱ6, ॱ4, this.ˎ.ॱ(3), this.ˎ.ॱ(3));
    }

    private List<Cue> ͺ() {
        List arrayList = new ArrayList();
        int i = 0;
        while (i < 8) {
            if (!this.ॱ[i].ॱ() && this.ॱ[i].ˊ()) {
                arrayList.add(this.ॱ[i].ᐝ());
            }
            i++;
        }
        Collections.sort(arrayList);
        return Collections.unmodifiableList(arrayList);
    }

    private void ॱˋ() {
        for (int i = 0; i < 8; i++) {
            this.ॱ[i].ˏ();
        }
    }
}
